/**
 * @file contests/cf1699/a/main.cpp
 * @brief
 * @see
 * @author Ruiming Guo (guoruiming@stu.scu.edu.cn)
 * @copyright 2022
 * @date 2022/7/4 22:29:57
 **/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main() {
  // High rating and good luck!
  int tc;
  scanf("%d", &tc);
  while (tc--) {
    int n;
    scanf("%d", &n);
    if (n % 2) {
      puts("-1");
    } else {
      printf("0 %d %d\n", n / 2, n / 2);
    }
  }
  return 0;
}
